local skel = fk.CreateSkill {
  name = "emo__lianmian",
  tags = {Skill.Switch},
}

Fk:loadTranslationTable{
  ["emo__lianmian"] = "连绵",
  [":emo__lianmian"] = "转换技，当你使用目标①无②有你的牌时，你摸一张牌。",

  [":emo__lianmian_yang"] = "转换技，当你使用目标<font color='#E0DB2F'>①无</font>②有你的牌时，你摸一张牌。",
  [":emo__lianmian_yin"] = "转换技，当你使用目标①无<font color='#E0DB2F'>②有你</font>的牌时，你摸一张牌。",

  ["$emo__lianmian1"] = "生生不息，源源不绝。",
  ["$emo__lianmian2"] = "失之淡然，得之坦然。",
}

skel:addEffect(fk.CardUsing, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    if target == player and player:hasSkill(skel.name) and data.tos then
      if player:getSwitchSkillState(skel.name) == fk.SwitchYang then
        return not table.contains(data.tos, player)
      else
        return table.contains(data.tos, player)
      end
    end
  end,
  on_cost = Util.TrueFunc,
  on_use = function(self, event, target, player, data)
    player:drawCards(1, skel.name)
  end,
})

return skel
